//package com.plian.system.service.zzd.impl;
//
//import cn.hutool.core.map.MapUtil;
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.plian.Tools.*;
//import com.plian.Tools.operation.OperationExpressionUtil;
//import com.plian.system.client.bank.KingdeeClient;
//import com.plian.system.config.YthTaskObserver;
//import com.plian.system.constant.fr.FinancingVarietiesConstant;
//import com.plian.system.constant.sys.FormStatusConstant;
//import com.plian.system.dto.fr.indicators.IndicatorsValueDTO;
//import com.plian.system.dto.zzd.ZZDCompanyIndicatorsQuery;
//import com.plian.system.dto.zzd.ZZDFinancingQuery;
//import com.plian.system.dto.zzd.ZZDIndicatorsQuery;
//import com.plian.system.dto.zzd.ZZDQuery;
//import com.plian.system.entity.fr.bulletin.BulletinValue;
//import com.plian.system.entity.fr.bulletin.NewBulletin;
//import com.plian.system.entity.fr.indicators.GraphicOrgRelation;
//import com.plian.system.entity.fr.procurement.MaterialProcurement;
//import com.plian.system.entity.pm.property.PropertyBasics;
//import com.plian.system.entity.sys.Org;
//import com.plian.system.entity.zzd.ReportAccInfo;
//import com.plian.system.entity.zzd.ReportBalance;
//import com.plian.system.enumeratea.ZZDIndicatorsEnum;
//import com.plian.system.mapper.fr.indicators.IndicatorsValueMapper;
//import com.plian.system.mapper.pm.property.PropertyBasicsMapper;
//import com.plian.system.mapper.zzd.*;
//import com.plian.system.properties.GzwProperties;
//import com.plian.system.service.bt.baseinfo.BaseInfoService;
//import com.plian.system.service.fr.bulletin.IBulletinValueService;
//import com.plian.system.service.fr.bulletin.INewBulletinService;
//import com.plian.system.service.fr.indicators.IComplexIndicatorsValueService;
//import com.plian.system.service.fr.indicatorsvalue.IGraphicOrgRelationService;
//import com.plian.system.service.fr.indicatorsvalue.IIndicatorsReportService;
//import com.plian.system.service.fr.organzationmonthratio.OrganzationMonthRatioService;
//import com.plian.system.service.fr.procurement.IMaterialProcurementService;
//import com.plian.system.service.sys.orgzation.IOrgService;
//import com.plian.system.service.zzd.IZZDFinanceService;
//import com.plian.system.service.zzd.helper.ZZDHelper;
//import com.plian.system.vo.fr.financing.FacadeQueryVO;
//import com.plian.system.vo.fr.financing.FacadeSummaryVO;
//import com.plian.system.vo.fr.financing.KingdeeReturnVO;
//import com.plian.system.vo.fr.indicatorsValue.IndicatorsReportVO;
//import com.plian.system.vo.fr.indicatorsValue.IndicatorsValueVO;
//import com.plian.system.vo.sys.OrgVO;
//import com.plian.system.vo.zzd.finance.*;
//import com.plian.system.vo.zzd.sys.OverviewIndicatorsValueVO;
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Service;
//
//import java.math.BigDecimal;
//import java.util.*;
//import java.util.stream.Collectors;
//import java.util.stream.Stream;
//
//import static com.plian.system.constant.baseinfo.ValueSetConstant.PROCUREMENT_CATEGORY;
//import static com.plian.system.constant.baseinfo.ValueSetConstant.PROCUREMENT_WAY;
//import static com.plian.system.constant.fr.IndicatorsCodeConstant.*;
//import static java.util.stream.Collectors.reducing;
//
//@Slf4j
//@Service
//@AllArgsConstructor
//public class ZZDFinanceServiceImpl implements IZZDFinanceService {
//
//    private IOrgService orgService;
//
//    private IndicatorsValueMapper indicatorsValueMapper;
//
//    private INewBulletinService newBulletinService;
//
//    private IIndicatorsReportService indicatorsReportService;
//
//    private IComplexIndicatorsValueService complexIndicatorsValueService;
//
//    private GzwProperties gzwProperties;
//
//    private IGraphicOrgRelationService graphicOrgRelationService;
//
//    private IBulletinValueService bulletinValueService;
//
//    private IMaterialProcurementService materialProcurementService;
//
//    private BaseInfoService baseInfoService;
//
//    private IBankOrgStorageService bankOrgStorageService;
//
//    private BankOrgStorageWrapper bankOrgStorageWrapper;
//
//    private final static String MAX_MONTH = "12";
//
//    private final static String SUM_MONTH = "00";
//
//    private final static String MONTH = "month";
//
//    private final static String FINANCING_COST_RATE = "financingCostRate";
//
//    private final static String INTEREST_BEARING_TOTAL = "interestBearingTotal";
//
//    private final static String DIRECT_FINANCING = "directFinancing";
//
//    private final static String INDIRECT_FINANCING = "indirectFinancing";
//
//    private final static String LONG_TERM_FINANCING = "longTermFinancing";
//
//    private final static String SHORT_TERM_FINANCING = "shortTermFinancing";
//
//    private CommCorporationMapper commCorporationMapper;
//    private ReportAccInfoMapper reportAccInfoMapper;
//    private ReportBalanceMapper reportBalanceMapper;
//    private ReportTransDtlMapper reportTransDtlMapper;
//    private ReportTransSummaryMapper reportTransSummaryMapper;
//    private OrganzationMonthRatioService organzationMonthRatioService;
//
//    private PropertyBasicsMapper propertyBasicsMapper;
//
//
//    /**
//     * 组织处理
//     *
//     * @param zzdQuery
//     * @param indicatorsValueDTO
//     * @param subtractChildList
//     * @param addChildList
//     * @param sumChildOrgIds
//     */
//    private void handleOrgId(ZZDQuery zzdQuery, IndicatorsValueDTO indicatorsValueDTO,
//                             List<String> subtractChildList, List<String> addChildList, List<String> sumChildOrgIds) {
//        handleOrgId(zzdQuery.getOrgType(), zzdQuery.getReportTime(), indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//    }
//
//    /**
//     * @param orgType            1全大市  2监管企业
//     * @param reportTime
//     * @param indicatorsValueDTO
//     * @param subtractChildList
//     * @param addChildList
//     * @param sumChildOrgIds
//     */
//    private void handleOrgId(int orgType, String reportTime, IndicatorsValueDTO indicatorsValueDTO,
//                             List<String> subtractChildList, List<String> addChildList, List<String> sumChildOrgIds) {
//        if (orgType == 2) {
//            //监管企业处理
//            List<String> orgIds = new ArrayList<>();
//            sumChildOrgIds.addAll(orgService.getGzwUnits(orgService.getDTFlag(reportTime))
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//            orgIds.addAll(sumChildOrgIds);
//            List<String> tempSubList = graphicOrgRelationService.getSubtractChildList(reportTime);
//            if (CollectionUtil.isNotEmpty(tempSubList)) {
//                subtractChildList.addAll(tempSubList);
//                orgIds.addAll(tempSubList);
//            }
//            List<String> tempAddList = graphicOrgRelationService.getAddChildList(reportTime);
//            if (CollectionUtil.isNotEmpty(tempAddList)) {
//                addChildList.addAll(tempAddList);
//                orgIds.addAll(tempAddList);
//            }
//            indicatorsValueDTO.setOrgIds(orgIds);
//        } else {
//            sumChildOrgIds.add(gzwProperties.getId());
//            indicatorsValueDTO.setOrgIds(Stream.of(gzwProperties.getId()).collect(Collectors.toList()));
//        }
//    }
//
//
//    @Override
//    public FinancialDataVO financialData(ZZDQuery zzdQuery) {
//        ZZDHelper.checkQuery(zzdQuery);
//        List<String> subtractChildList = new ArrayList<>();
//        List<String> addChildList = new ArrayList<>();
//        List<String> sumChildOrgIds = new ArrayList<>();
//        String[] reportTimes = zzdQuery.getReportTime().split(StringPool.DASH);
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        handleOrgId(zzdQuery, indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//        indicatorsValueDTO.setCodes(Stream.of(K22, K30, K36, KLJ1, KLJ19, KSUM49, K57, KSUM59, KSUM62).collect(Collectors.toList()));
//
//        List<IndicatorsValueVO> indicatorsValueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//
//        Map<String, BigDecimal> codeValueMap = ZZDHelper.indicatorsValueToValueMap(Integer.valueOf(reportTimes[0]), indicatorsValueVOS, subtractChildList, addChildList, sumChildOrgIds);
//        FinancialDataVO financialDataVO = ZZDHelper.codeValueMapToDataVO(codeValueMap, new BigDecimal(10000));
//
//        if (zzdQuery.getOrgType() == 2) {
//            financialDataVO.setNetAssetsRoe(complexIndicatorsValueService.getComplexIndicatorsValue(gzwProperties.getReportId(), JZCSYL, zzdQuery.getReportTime()));
//        } else {
//            financialDataVO.setNetAssetsRoe(indicatorsReportService
//                    .getNetAssets(Stream.of(gzwProperties.getId()).collect(Collectors.toList()), zzdQuery.getReportTime()));
//        }
//
//        return financialDataVO;
//    }
//
//    @Override
//    public List<IndicatorsReportVO> getAssetIndicators(String reportTime) {
//        List<String> subtractChildList = new ArrayList<>();
//        List<String> addChildList = new ArrayList<>();
//        List<String> sumChildOrgIds = new ArrayList<>();
//
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIds(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//        }
//        handleOrgId(2, reportTime, indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        indicatorsValueDTO.setCodes(Stream.of(K22, KLAST22, K30, KLAST30, K36, KLAST36, K33, KLAST33).collect(Collectors.toList()));
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        //  对valueVOS按code分组，对value合计
//        Map<String, BigDecimal> codeValueMap = ZZDHelper
//                .indicatorsValueToValueMap(Integer.valueOf(reportTimes[0]), valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//        indicatorsValueDTO.setCodes(Stream.of(Y22, Y30, Y36, Y33).collect(Collectors.toList()));
//        indicatorsValueDTO.setMonth(SUM_MONTH);
//        List<IndicatorsValueVO> budgetValueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        codeValueMap.putAll(budgetValueVOS.stream()
//                .collect(Collectors.groupingBy(IndicatorsValueVO::getCode, reducing(BigDecimal.ZERO, IndicatorsValueVO::getValue, BigDecimal::add))));
//        return Stream.of(ZZDHelper.getReportVO(K22, KLAST22, Y22, K22_NAME, codeValueMap),
//                ZZDHelper.getReportVO(K36, KLAST36, Y36, K36_NAME, codeValueMap),
//                ZZDHelper.getReportVO(K30, KLAST30, Y30, K30_NAME, codeValueMap),
//                ZZDHelper.getReportVO(K33, KLAST33, Y33, K33_NAME, codeValueMap)).collect(Collectors.toList());
//    }
//
//    @Override
//    public List<IndicatorsReportVO> getOperatingIndicators(String reportTime) {
//        List<String> subtractChildList = new ArrayList<>();
//        List<String> addChildList = new ArrayList<>();
//        List<String> sumChildOrgIds = new ArrayList<>();
//
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIds(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//        }
//        handleOrgId(2, reportTime, indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        indicatorsValueDTO.setCodes(Stream.of(KLJ1, KLASTLJ1, KLJ19, KLASTLJ19, KSUM40, KLAST40, K58, KLAST58).collect(Collectors.toList()));
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        //  对valueVOS按code分组，对value合计
//        Map<String, BigDecimal> codeValueMap = ZZDHelper
//                .indicatorsValueToValueMap(Integer.valueOf(reportTimes[0]), valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//        indicatorsValueDTO.setCodes(Stream.of(Y1, Y19, Y20).collect(Collectors.toList()));
//        indicatorsValueDTO.setMonth("00");
//        List<IndicatorsValueVO> budgetValueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        codeValueMap.putAll(budgetValueVOS.stream()
//                .collect(Collectors.groupingBy(IndicatorsValueVO::getCode, reducing(BigDecimal.ZERO, IndicatorsValueVO::getValue, BigDecimal::add))));
//        //去年同期年月
//        String lastReportTime = DateUtil.format(DateUtil.minusYears(DateUtil.parse(reportTime, DateUtil.PATTERN_MONTH), 1), DateUtil.PATTERN_MONTH);
//        return Stream.of(ZZDHelper.getReportVO(KLJ1, KLASTLJ1, Y1, KLJ1_NAME, codeValueMap),
//                ZZDHelper.getReportVO(KLJ19, KLASTLJ19, Y19, KLJ19_NAME, codeValueMap),
//                ZZDHelper.valueToReportVO(complexIndicatorsValueService.getComplexIndicatorsValue(gzwProperties.getReportId(), JZCSYL, reportTime),
//                        complexIndicatorsValueService.getComplexIndicatorsValue(gzwProperties.getReportId(), JZCSYL, lastReportTime), null, JZCSYL, JZCSYL_NAME),
////                ZZDHelper.getReportVO(KSUM40, KLAST40, Y20, KSUM40_NAME, codeValueMap),
//                ZZDHelper.getReportVO(TOTAL_PROFIT_TAX, Stream.of(KSUM40, K58).collect(Collectors.toList()),
//                        Stream.of(KLAST40, KLAST58).collect(Collectors.toList()), null, TOTAL_PROFIT_TAX_NAME, codeValueMap)).collect(Collectors.toList());
//    }
//
//    @Override
//    public List<IndicatorsUnitDetailVO> getIndicatorsUnitDetail(String code, String reportTime) {
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIds(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//        }
//
//        if (JZCSYL.equals(code)) {
//            //净资产收益率
//            indicatorsValueDTO.setCodes(Stream.of(K58, K36).collect(Collectors.toList()));
//        } else if (TOTAL_PROFIT_TAX.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(KSUM40, K58).collect(Collectors.toList()));
//        } else {
//            indicatorsValueDTO.setCodes(Stream.of(code).collect(Collectors.toList()));
//        }
//
//        List<Org> summaryOrgList = orgService.getGzwUnits(orgService.getDTFlag(reportTime));
//        Map<String, Org> orgIdMap = summaryOrgList.stream().collect(Collectors.toMap(Org::getId, org -> org));
//        List<String> queryOrgIds = summaryOrgList.stream().map(Org::getId).collect(Collectors.toList());
//        queryOrgIds.addAll(graphicOrgRelationService.getAddChildList(reportTime));
//        queryOrgIds.addAll(graphicOrgRelationService.getSubtractChildList(reportTime));
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        indicatorsValueDTO.setOrgIds(queryOrgIds);
//        List<IndicatorsUnitDetailVO> indicatorsUnitDetailVOS = new ArrayList<>();
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//
//        List<IndicatorsValueVO> last36List = new ArrayList<>();
//        if (JZCSYL.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(K36).collect(Collectors.toList()));
//            indicatorsValueDTO.setYear(String.valueOf(Integer.parseInt(reportTimes[0]) - 1));
//            indicatorsValueDTO.setMonth(MAX_MONTH);
//            last36List = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        }
//
//        Map<String, List<IndicatorsValueVO>> valueVOOrgIdMap = valueVOS.stream().collect(Collectors.groupingBy(IndicatorsValueVO::getOrgId));
//        Map<String, List<GraphicOrgRelation>> mergeMap = graphicOrgRelationService.getMergeMap(reportTime);
//        int year = Integer.parseInt(reportTimes[0]);
//        List<String> allMergeId = new ArrayList<>();
//        OperationExpressionUtil operationExpressionUtil = new OperationExpressionUtil();
//        if (CollectionUtil.isNotEmpty(mergeMap)) {
//            //对mergeMap 进行循坏
//            for (String key : mergeMap.keySet()) {
//                List<GraphicOrgRelation> relationList = mergeMap.get(key);
//                List<String> sumChildOrgIds = relationList.stream().map(GraphicOrgRelation::getChildId).collect(Collectors.toList());
//                allMergeId.addAll(sumChildOrgIds);
//                Org org = orgIdMap.get(sumChildOrgIds.get(0));
//                Map<String, BigDecimal> codeValueMap = ZZDHelper.indicatorsValueToValueMap(year, valueVOS, null, null, sumChildOrgIds);
//                IndicatorsUnitDetailVO detail = new IndicatorsUnitDetailVO();
//                setValue(codeValueMap, operationExpressionUtil, code, detail, null, null, sumChildOrgIds, last36List, reportTimes, year);
//                detail.setUnitId(key.split(StringPool.DASH)[0]);
//                detail.setUnitName(key.split(StringPool.DASH)[1]);
//                detail.setOrderNum(org.getOrderNum());
//                indicatorsUnitDetailVOS.add(detail);
//            }
//        }
//
//        List<String> allParentId = graphicOrgRelationService.getAllParentId(reportTime);
//        summaryOrgList = summaryOrgList.stream().filter(org -> !allMergeId.contains(org.getId())).collect(Collectors.toList());
//        for (Org org : summaryOrgList) {
//            String orgId = org.getId();
//            List<String> sumChildOrgIds = Stream.of(orgId).collect(Collectors.toList());
//            List<String> subtractChildList = new ArrayList<>();
//            List<String> addChildList = new ArrayList<>();
//            List<IndicatorsValueVO> valueVOList = valueVOOrgIdMap.get(orgId);
//            IndicatorsUnitDetailVO detail = new IndicatorsUnitDetailVO();
//            detail.setUnitId(valueVOList.get(0).getOrgId());
//            detail.setUnitName(StringUtil.isNotBlank(valueVOList.get(0).getOrgShortName()) ? valueVOList.get(0).getOrgShortName() : valueVOList.get(0).getOrgName());
//            if (allParentId.contains(orgId)) {
//                subtractChildList = graphicOrgRelationService.getSubtract(orgId, reportTime);
//                addChildList = graphicOrgRelationService.getAdd(orgId, reportTime);
//            }
//            Map<String, BigDecimal> codeValueMap = ZZDHelper.indicatorsValueToValueMap(year, valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//            setValue(codeValueMap, operationExpressionUtil, code, detail, subtractChildList, addChildList, sumChildOrgIds, last36List, reportTimes, year);
//            detail.setOrderNum(org.getOrderNum());
//            indicatorsUnitDetailVOS.add(detail);
//        }
//        return indicatorsUnitDetailVOS.stream().sorted(Comparator.comparing(IndicatorsUnitDetailVO::getValue).reversed()).collect(Collectors.toList());
//    }
//
//    @Override
//    public IndicatorsYearDataVO getIndicatorsYearData(String code, String reportTime) {
//        List<String> subtractChildList = new ArrayList<>();
//        List<String> addChildList = new ArrayList<>();
//        List<String> sumChildOrgIds = new ArrayList<>();
//
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIds(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//        }
//        handleOrgId(2, reportTime, indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        int year = Integer.valueOf(reportTimes[0]);
//        List<String> yearList = new ArrayList<>();
//        List<BigDecimal> valueList = new ArrayList<>();
//        indicatorsValueDTO.setCodes(Stream.of(code).collect(Collectors.toList()));
//        for (int i = year - 4; i < year; i++) {
//            String yearStr = String.valueOf(i);
//            yearList.add(yearStr);
//            indicatorsValueDTO.setYear(yearStr);
//            indicatorsValueDTO.setMonth(MAX_MONTH);
//            List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//            if (CollectionUtil.isNotEmpty(valueVOS)) {
//                //对valueVOS的value进行合计
//                Map<String, BigDecimal> codeValueMap = ZZDHelper
//                        .indicatorsValueToValueMap(year, valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//                BigDecimal bigDecimal = BigDecimalUtil.divide(codeValueMap.get(code), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP);
//                valueList.add(bigDecimal);
//            } else {
//                valueList.add(null);
//            }
//        }
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//        yearList.add(reportTimes[0]);
//        if (CollectionUtil.isNotEmpty(valueVOS)) {
//            Map<String, BigDecimal> codeValueMap = ZZDHelper
//                    .indicatorsValueToValueMap(Integer.parseInt(reportTimes[0]), valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//            BigDecimal bigDecimal = BigDecimalUtil.divide(codeValueMap.get(code), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP);
//            valueList.add(bigDecimal);
//        } else {
//            valueList.add(null);
//        }
//        return IndicatorsYearDataVO.builder().yearList(yearList).valueList(valueList).build();
//    }
//
//    @Override
//    public RevenueMonthDataVO getYearRevenue(String reportTime) {
//        List<String> subtractChildList = new ArrayList<>();
//        List<String> addChildList = new ArrayList<>();
//        List<String> sumChildOrgIds = new ArrayList<>();
//
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIds(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()));
//        }
//        handleOrgId(2, reportTime, indicatorsValueDTO, subtractChildList, addChildList, sumChildOrgIds);
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        indicatorsValueDTO.setCodes(Stream.of(KLJ1, KLJ19).collect(Collectors.toList()));
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryAllMonthGroupValueByCode2(indicatorsValueDTO);
//        //  对valueVOS按code分组，对value合计
//        Map<String, BigDecimal> codeMonthValueMap = ZZDHelper
//                .indicatorsValueToMonthValueMap(Integer.valueOf(reportTimes[0]), valueVOS, subtractChildList, addChildList, sumChildOrgIds);
//        List<Integer> monthList = new ArrayList<>();
//        List<BigDecimal> businessIncomeList = new ArrayList<>();
//        List<BigDecimal> totalProfitList = new ArrayList<>();
//        for (int i = 1; i <= Integer.valueOf(reportTimes[1]); i++) {
//            monthList.add(i);
//            businessIncomeList.add(BigDecimalUtil.divide(codeMonthValueMap.get(KLJ1 + StringPool.DASH + i), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//            totalProfitList.add(BigDecimalUtil.divide(codeMonthValueMap.get(KLJ19 + StringPool.DASH + i), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//        }
//        return RevenueMonthDataVO.builder().monthList(monthList).businessIncomeList(businessIncomeList).totalProfitList(totalProfitList).build();
//    }
//
//    @Override
//    public ProfitsLossesVO getProfitsLosses(String reportTime) {
//        if (StringUtil.isBlank(reportTime)) {
//            reportTime = newBulletinService.getMaxReportTimeByOrgIdsAndType(orgService.getGzwUnits(false)
//                    .stream().map(Org::getId).collect(Collectors.toList()), 0);
//        }
//        List<NewBulletin> newBulletinList = newBulletinService.list(Wrappers.<NewBulletin>lambdaQuery()
//                .eq(NewBulletin::getTableTypeCode, 0)
//                .eq(NewBulletin::getStatus, FormStatusConstant.FINISH)
//                .eq(NewBulletin::getReportTime, reportTime + "-01"));
//        List<BulletinValue> bulletinValues = bulletinValueService.list(Wrappers.<BulletinValue>lambdaQuery()
//                .eq(BulletinValue::getTypeCode, KLJ19_CODE)
//                .in(BulletinValue::getBulletinId, newBulletinList.stream().map(NewBulletin::getId).collect(Collectors.toList())));
//        ProfitsLossesVO profitsLossesVO = ProfitsLossesVO.builder()
//                .profitNumber(BigDecimal.valueOf(0)).totalProfit(BigDecimal.valueOf(0))
//                .lossNumber(BigDecimal.valueOf(0)).totalLoss(BigDecimal.valueOf(0))
//                .build();
//        for (BulletinValue bulletinValue : bulletinValues) {
//            if (bulletinValue.getYearAmount() == null || BigDecimalUtil.isZero(bulletinValue.getYearAmount())) {
//                continue;
//            }
//            if (bulletinValue.getYearAmount().compareTo(BigDecimal.valueOf(0)) == 1) {
//                profitsLossesVO.setProfitNumber(BigDecimalUtil.add(profitsLossesVO.getProfitNumber(), BigDecimal.valueOf(1)));
//                profitsLossesVO.setTotalProfit(BigDecimalUtil.add(profitsLossesVO.getTotalProfit(), bulletinValue.getYearAmount()));
//            } else {
//                profitsLossesVO.setLossNumber(BigDecimalUtil.add(profitsLossesVO.getLossNumber(), BigDecimal.valueOf(1)));
//                profitsLossesVO.setTotalLoss(BigDecimalUtil.add(profitsLossesVO.getTotalLoss(), bulletinValue.getYearAmount()));
//            }
//        }
//        BigDecimal totalNumber = BigDecimalUtil.add(profitsLossesVO.getProfitNumber(), profitsLossesVO.getLossNumber());
//        profitsLossesVO.setProfitRatio(BigDecimalUtil.divide(profitsLossesVO.getProfitNumber(), totalNumber, 2, BigDecimal.ROUND_HALF_UP, 100));
//        profitsLossesVO.setLossRatio(BigDecimalUtil.divide(profitsLossesVO.getLossNumber(), totalNumber, 2, BigDecimal.ROUND_HALF_UP, 100));
//        profitsLossesVO.setTotalProfit(BigDecimalUtil.divide(profitsLossesVO.getTotalProfit(), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//        profitsLossesVO.setTotalLoss(BigDecimalUtil.divide(profitsLossesVO.getTotalLoss(), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//        return profitsLossesVO;
//    }
//
//    @Override
//    public MaterialProcurementOverviewVO getMaterialOverview() {
//        String nowYear = DateUtil.format(DateUtil.now(), DateUtil.PATTERN_YEAR);
//        nowYear = "2022";
//        List<MaterialProcurement> materialProcurementList = getMaterialProcurementByYear(nowYear);
//        if (CollectionUtil.isEmpty(materialProcurementList)) {
//            return new MaterialProcurementOverviewVO();
//        }
//        Set<String> suppliersSet = new HashSet<>();
//        BigDecimal tradingVolume = new BigDecimal(0);
//        for (MaterialProcurement materialProcurement : materialProcurementList) {
//            if (StringUtil.isNotBlank(materialProcurement.getSupplier())) {
//                suppliersSet.addAll(Arrays.asList(materialProcurement.getSupplier().split("、")));
//            }
//            tradingVolume = BigDecimalUtil.add(tradingVolume, materialProcurement.getProcurementContractAmount());
//        }
//        return MaterialProcurementOverviewVO.builder()
//                .projectNumber(materialProcurementList.size())
//                .suppliersNumber(suppliersSet.size())
//                .tradingVolume(BigDecimalUtil.divide(tradingVolume, BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP)).build();
//    }
//
//    @Override
//    public List<MaterialProcurementCountDetailVO> getMaterialGroupByProject() {
//        String nowYear = DateUtil.format(DateUtil.now(), DateUtil.PATTERN_YEAR);
//        nowYear = "2022";
//        List<MaterialProcurement> materialProcurementList = getMaterialProcurementByYear(nowYear);
//        if (CollectionUtil.isEmpty(materialProcurementList)) {
//            return new ArrayList<>();
//        }
//        BigDecimal totalValue = materialProcurementList.stream()
//                .filter(materialProcurement -> StringUtil.isNotBlank(materialProcurement.getProcurementCategoryId()))
//                .collect(Collectors.reducing(BigDecimal.ZERO, MaterialProcurement::getProcurementContractAmount, BigDecimal::add));
//        Map<String, BigDecimal> valueMap = materialProcurementList.stream()
//                .filter(materialProcurement -> StringUtil.isNotBlank(materialProcurement.getProcurementCategoryId()))
//                .collect(Collectors.groupingBy(MaterialProcurement::getProcurementCategoryId,
//                        reducing(BigDecimal.ZERO, MaterialProcurement::getProcurementContractAmount, BigDecimal::add)));
//        return valueMapToDetailVO(PROCUREMENT_CATEGORY, valueMap, totalValue);
//    }
//
//    @Override
//    public List<MaterialProcurementCountDetailVO> getMaterialGroupByProcurementWay() {
//        String nowYear = DateUtil.format(DateUtil.now(), DateUtil.PATTERN_YEAR);
//        nowYear = "2022";
//        List<MaterialProcurement> materialProcurementList = getMaterialProcurementByYear(nowYear);
//        if (CollectionUtil.isEmpty(materialProcurementList)) {
//            return new ArrayList<>();
//        }
//        BigDecimal totalValue = materialProcurementList.stream()
//                .filter(materialProcurement -> StringUtil.isNotBlank(materialProcurement.getProcurementWayId()))
//                .collect(Collectors.reducing(BigDecimal.ZERO, MaterialProcurement::getProcurementContractAmount, BigDecimal::add));
//        Map<String, BigDecimal> valueMap = materialProcurementList.stream()
//                .filter(materialProcurement -> StringUtil.isNotBlank(materialProcurement.getProcurementWayId()))
//                .collect(Collectors.groupingBy(MaterialProcurement::getProcurementWayId,
//                        reducing(BigDecimal.ZERO, MaterialProcurement::getProcurementContractAmount, BigDecimal::add)));
//        return valueMapToDetailVO(PROCUREMENT_WAY, valueMap, totalValue);
//    }
//
//    @Override
//    public FinancingOverviewVO getFinancingOverview(ZZDFinancingQuery zzdFinancingQuery) {
//        if (StringUtil.isBlank(zzdFinancingQuery.getOrgId())) {
//            zzdFinancingQuery.setOrgId(gzwProperties.getReportId());
//        }
//        Date endDate = DateUtil.minusMillis(DateUtil.plusMonths(DateUtil.parse(zzdFinancingQuery.getEndDate(), DateUtil.PATTERN_MONTH), 1), 1);
//        List<BankOrgStorage> storages = bankOrgStorageService.list(Wrappers.<BankOrgStorage>lambdaQuery()
//                .eq(BankOrgStorage::getOrgId, zzdFinancingQuery.getOrgId())
//                .le(BankOrgStorage::getDate, endDate).orderByDesc(BankOrgStorage::getDate).comment("limit 1"));
//        if (CollectionUtil.isEmpty(storages)) {
//            return new FinancingOverviewVO();
//        }
//        return bankOrgStorageWrapper.entityToOverviewVO(storages.get(0));
//    }
//
//    @Override
//    public FinancingMonthDataVO getFinancingMonthData(ZZDFinancingQuery zzdFinancingQuery) {
//        if (StringUtil.isBlank(zzdFinancingQuery.getOrgId())) {
//            zzdFinancingQuery.setOrgId(gzwProperties.getReportId());
//        }
//        Date startDate = DateUtil.plusMillis(DateUtil.parse(zzdFinancingQuery.getStartDate(), DateUtil.PATTERN_MONTH), 1);
//        Date endDate = DateUtil.minusMillis(DateUtil.plusMonths(DateUtil.parse(zzdFinancingQuery.getEndDate(), DateUtil.PATTERN_MONTH), 1), 1);
//        List<BankOrgStorage> storages = bankOrgStorageService.list(Wrappers.<BankOrgStorage>lambdaQuery()
//                .eq(BankOrgStorage::getOrgId, zzdFinancingQuery.getOrgId())
//                .between(BankOrgStorage::getDate, startDate, endDate).orderByAsc(BankOrgStorage::getDate));
//        if (CollectionUtil.isEmpty(storages)) {
//            return new FinancingMonthDataVO();
//        }
//        Map<String, List<BankOrgStorage>> monthMap = storages.stream()
//                .collect(Collectors.groupingBy(storage -> DateUtil.format(storage.getDate(), DateUtil.PATTERN_MONTH)));
//        List<String> monthList = DateUtil.findDates(1, startDate, endDate);
//        List<BigDecimal> valueList = new ArrayList<>();
//        for (String month : monthList) {
//            if (monthMap.containsKey(month)) {
//                List<BankOrgStorage> monthStorages = monthMap.get(month).stream()
//                        .sorted(Comparator.comparing(BankOrgStorage::getDate).reversed()).collect(Collectors.toList());
//                valueList.add(financingCodeToValue(zzdFinancingQuery.getCode(), monthStorages.get(0)));
//            } else {
//                valueList.add(null);
//            }
//        }
//        return FinancingMonthDataVO.builder().monthList(monthList).valueList(valueList).build();
//    }
//
//    @Override
//    public List<FinancingUnitDetailVO> getFinancingUnitDetail(ZZDFinancingQuery zzdFinancingQuery) {
//        Date startDate = DateUtil.plusMillis(DateUtil.parse(zzdFinancingQuery.getStartDate(), DateUtil.PATTERN_MONTH), 1);
//        Date endDate = DateUtil.minusMillis(DateUtil.plusMonths(DateUtil.parse(zzdFinancingQuery.getEndDate(), DateUtil.PATTERN_MONTH), 1), 1);
//        List<BankOrgStorage> storages = bankOrgStorageService.list(Wrappers.<BankOrgStorage>lambdaQuery()
//                .eq(StringUtil.isNotBlank(zzdFinancingQuery.getOrgId()), BankOrgStorage::getOrgId, zzdFinancingQuery.getOrgId())
//                .ne(BankOrgStorage::getOrgId, gzwProperties.getReportId())
//                .between(BankOrgStorage::getDate, startDate, endDate).orderByAsc(BankOrgStorage::getDate));
//        Map<String, List<BankOrgStorage>> monthOrgIdMap = storages.stream()
//                .collect(Collectors.groupingBy(BankOrgStorage::getOrgId));
//        List<FinancingUnitDetailVO> detailVOS = new ArrayList<>();
//        Map<String, OrgVO> orgVOMap = orgService.findCheckName(orgService.getFinancingOrgList()).stream().collect(Collectors.toMap(OrgVO::getId, orgVO -> orgVO));
//        for (String orgId : monthOrgIdMap.keySet()) {
//            List<BankOrgStorage> monthStorages = monthOrgIdMap.get(orgId).stream()
//                    .sorted(Comparator.comparing(BankOrgStorage::getDate).reversed()).collect(Collectors.toList());
//            FinancingUnitDetailVO detailVO = new FinancingUnitDetailVO();
//            OrgVO orgVO = orgVOMap.get(orgId);
//            if (orgVO == null) {
//                continue;
//            }
//            detailVO.setUnitName(StringUtil.isNotBlank(orgVO.getOrgCheckName()) ? orgVO.getOrgCheckName() : orgVO.getName());
//            detailVO.setUnitId(orgId);
//            detailVO.setValue(financingCodeToValue(zzdFinancingQuery.getCode(), monthStorages.get(0)));
//            detailVO.setOrderNum(orgVO.getOrderNum());
//            detailVOS.add(detailVO);
//        }
//        return detailVOS.stream().sorted(Comparator.comparing(FinancingUnitDetailVO::getValue,
//                Comparator.nullsFirst(Comparator.naturalOrder())).reversed()).collect(Collectors.toList());
//    }
//
//    @Override
//    public OverviewIndicatorsValueVO getOverviewIndicatorsInfo(ZZDIndicatorsQuery zzdIndicatorsQuery) {
//        String code = zzdIndicatorsQuery.getColumnCode();
//        IndicatorsValueDTO indicatorsValueDTO = new IndicatorsValueDTO();
//        String reportTime = zzdIndicatorsQuery.getReportTime();
//        String[] reportTimes = reportTime.split(StringPool.DASH);
//        indicatorsValueDTO.setYear(reportTimes[0]);
//        indicatorsValueDTO.setMonth(reportTimes[1]);
//        int year = Integer.parseInt(reportTimes[0]);
//        int month = Integer.parseInt(reportTimes[1]);
//        if (JZCSYL.equals(code)) {
//            //净资产收益率
//            indicatorsValueDTO.setCodes(Stream.of(K58, K36).collect(Collectors.toList()));
//        } else if (TOTAL_PROFIT_TAX.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(KSUM40, K58).collect(Collectors.toList()));
//        } else if (TOTAL_LIABILITIES_RATIO.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(K30, K22).collect(Collectors.toList()));
//        } else if (RD_INVESTMENT_INTENSITY.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(KSUM62, KLJ1).collect(Collectors.toList()));
//        } else if (LABOR_GENERATION_RATE.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(KSUM49, KSUM59).collect(Collectors.toList()));
//        } else if (OPERATING_CASH_RATION.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(K57, KLJ1).collect(Collectors.toList()));
//        } else {
//            indicatorsValueDTO.setCodes(Stream.of(code).collect(Collectors.toList()));
//        }
//
//        List<Org> summaryOrgList = orgService.getGzwUnits(orgService.getDTFlag(reportTime));
//        Map<String, Org> orgIdMap = summaryOrgList.stream().collect(Collectors.toMap(Org::getId, org -> org));
//        List<String> sumChildOrgIds = summaryOrgList.stream().map(Org::getId).collect(Collectors.toList());
//        List<String> queryOrgIds = new ArrayList<>();
//        queryOrgIds.addAll(sumChildOrgIds);
//        List<String> subtractChildList = graphicOrgRelationService.getSubtractChildList(reportTime);
//        List<String> addChildList = graphicOrgRelationService.getAddChildList(reportTime);
//        queryOrgIds.addAll(subtractChildList);
//        queryOrgIds.addAll(addChildList);
//        indicatorsValueDTO.setOrgIds(queryOrgIds);
//        List<IndicatorsUnitDetailVO> indicatorsUnitDetailVOS = new ArrayList<>();
//        List<IndicatorsValueVO> valueVOS = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//
//        Map<String, BigDecimal> sumCodeValueMap = ZZDHelper.indicatorsValueToValueMap(Integer.valueOf(reportTimes[0]), valueVOS,
//                subtractChildList, addChildList, sumChildOrgIds);
//        List<IndicatorsValueVO> last36List = new ArrayList<>();
//        if (JZCSYL.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(K36).collect(Collectors.toList()));
//            indicatorsValueDTO.setYear(String.valueOf(Integer.parseInt(reportTimes[0]) - 1));
//            indicatorsValueDTO.setMonth(MAX_MONTH);
//            last36List = indicatorsValueMapper.queryGroupValueByCode(indicatorsValueDTO);
//            Map<String, BigDecimal> last36ValueMap = ZZDHelper.indicatorsValueToValueMap(year - 1, last36List, subtractChildList, addChildList, sumChildOrgIds);
//            sumCodeValueMap.put(KLAST36, last36ValueMap.get(K36));
//        }
//
//        Map<String, List<IndicatorsValueVO>> valueVOOrgIdMap = valueVOS.stream().collect(Collectors.groupingBy(IndicatorsValueVO::getOrgId));
//        Map<String, List<GraphicOrgRelation>> mergeMap = graphicOrgRelationService.getMergeMap(reportTime);
//        List<String> allMergeId = new ArrayList<>();
//        OperationExpressionUtil operationExpressionUtil = new OperationExpressionUtil();
//        if (CollectionUtil.isNotEmpty(mergeMap)) {
//            //对mergeMap 进行循坏
//            for (String key : mergeMap.keySet()) {
//                List<GraphicOrgRelation> relationList = mergeMap.get(key);
//                List<String> tempSumChildOrgIds = relationList.stream().map(GraphicOrgRelation::getChildId).collect(Collectors.toList());
//                allMergeId.addAll(tempSumChildOrgIds);
//                Org org = orgIdMap.get(tempSumChildOrgIds.get(0));
//                Map<String, BigDecimal> codeValueMap = ZZDHelper.indicatorsValueToValueMap(year, valueVOS, null, null, tempSumChildOrgIds);
//                IndicatorsUnitDetailVO detail = new IndicatorsUnitDetailVO();
//                setValue(codeValueMap, operationExpressionUtil, code, detail, null, null, tempSumChildOrgIds, last36List, reportTimes, year);
//                detail.setUnitId(key.split(StringPool.DASH)[0]);
//                detail.setUnitName(key.split(StringPool.DASH)[1]);
//                detail.setOrderNum(org.getOrderNum());
//                indicatorsUnitDetailVOS.add(detail);
//            }
//        }
//
//        List<String> allParentId = graphicOrgRelationService.getAllParentId(reportTime);
//        summaryOrgList = summaryOrgList.stream().filter(org -> !allMergeId.contains(org.getId())).collect(Collectors.toList());
//        for (Org org : summaryOrgList) {
//            String orgId = org.getId();
//            List<String> tempSumChildOrgIds = Stream.of(orgId).collect(Collectors.toList());
//            List<String> tempSubtractChildList = new ArrayList<>();
//            List<String> tempAddChildList = new ArrayList<>();
//            List<IndicatorsValueVO> valueVOList = valueVOOrgIdMap.get(orgId);
//            IndicatorsUnitDetailVO detail = new IndicatorsUnitDetailVO();
//            detail.setUnitId(valueVOList.get(0).getOrgId());
//            detail.setUnitName(StringUtil.isNotBlank(valueVOList.get(0).getOrgShortName()) ? valueVOList.get(0).getOrgShortName() : valueVOList.get(0).getOrgName());
//            if (allParentId.contains(orgId)) {
//                tempSubtractChildList = graphicOrgRelationService.getSubtract(orgId, reportTime);
//                tempAddChildList = graphicOrgRelationService.getAdd(orgId, reportTime);
//            }
//            Map<String, BigDecimal> codeValueMap = ZZDHelper.indicatorsValueToValueMap(year, valueVOS, tempSubtractChildList, tempAddChildList, tempSumChildOrgIds);
//            setValue(codeValueMap, operationExpressionUtil, code, detail, tempSubtractChildList, tempAddChildList, tempSumChildOrgIds, last36List, reportTimes, year);
//            detail.setOrderNum(org.getOrderNum());
//            indicatorsUnitDetailVOS.add(detail);
//        }
//        return OverviewIndicatorsValueVO.builder()
//                .indicatorsValue(codeToValue(operationExpressionUtil, sumCodeValueMap, month, code))
//                .unitDetailList(indicatorsUnitDetailVOS)
//                .build();
//    }
//
//    @Override
//    public IndicatorTrendsVO getIndicatorTrends(ZZDCompanyIndicatorsQuery zzdCompanyIndicatorsQuery) {
//        String maxReportTime = newBulletinService.getMaxReportTimeByOrgId(zzdCompanyIndicatorsQuery.getOrgId());
//        if (StringUtil.isBlank(maxReportTime)) {
//            return null;
//        }
//        IndicatorsValueDTO indicatorsValueDTO = getQueryTimeList(zzdCompanyIndicatorsQuery.getQueryType(), maxReportTime);
//        ZZDIndicatorsEnum zzdIndicatorsEnum = ZZDIndicatorsEnum.getByColumnName(zzdCompanyIndicatorsQuery.getColumnName());
//        if (zzdIndicatorsEnum == null) {
//            return null;
//        }
//        String code = zzdIndicatorsEnum.getColumnCode();
//        if (JZCSYL.equals(code)) {
//            //净资产收益率
//            indicatorsValueDTO.setCodes(Stream.of(K58, K36).collect(Collectors.toList()));
//        } else if (TOTAL_LIABILITIES_RATIO.equals(code)) {
//            indicatorsValueDTO.setCodes(Stream.of(K30, K22).collect(Collectors.toList()));
//        } else {
//            indicatorsValueDTO.setCodes(Stream.of(code).collect(Collectors.toList()));
//        }
//        boolean haveChild = orgService.haveChild(zzdCompanyIndicatorsQuery.getOrgId());
//        indicatorsValueDTO.setIsGroup(haveChild ? "1" : "0");
//        indicatorsValueDTO.setOrgId(zzdCompanyIndicatorsQuery.getOrgId());
//        List<IndicatorsValueVO> indicatorsValueVOS = indicatorsValueMapper.queryValueList(indicatorsValueDTO);
//        Map<String, List<IndicatorsValueVO>> yearMonthMap = indicatorsValueVOS.stream().collect(Collectors.groupingBy(value -> {
//            return value.getYear() + StringPool.DASH + value.getMonth();
//        }));
//        Map<String, IndicatorsValueVO> last36YearMap = new HashMap<>();
//        if (JZCSYL.equals(code)) {
//            List<String> lastYearList = indicatorsValueDTO.getYearList().stream()
//                    .map(year -> String.valueOf(Integer.parseInt(year) - 1)).collect(Collectors.toList());
//            indicatorsValueDTO.setYearList(lastYearList);
//            indicatorsValueDTO.setMonthList(Stream.of(MAX_MONTH).collect(Collectors.toList()));
//            indicatorsValueDTO.setCodes(Stream.of(K36).collect(Collectors.toList()));
//            List<IndicatorsValueVO> last36IndicatorsValueVOS = indicatorsValueMapper.queryValueList(indicatorsValueDTO);
//            last36YearMap = last36IndicatorsValueVOS.stream().collect(Collectors.toMap(IndicatorsValueVO::getYear, value -> value));
//        }
//
//        List<BigDecimal> valueList = new ArrayList<>();
//        OperationExpressionUtil operationExpressionUtil = new OperationExpressionUtil();
//        for (String reportTime : indicatorsValueDTO.getReportTimeList()) {
//            if (yearMonthMap.containsKey(reportTime)) {
//                List<IndicatorsValueVO> valueVOS = yearMonthMap.get(reportTime);
//                if (JZCSYL.equals(code)) {
//                    //净资产收益率
//                    String lastYear = String.valueOf(Integer.valueOf(reportTime.substring(0, 4)) - 1);
//                    if (!last36YearMap.containsKey(lastYear)) {
//                        valueList.add(null);
//                        continue;
//                    }
//                    Map<String, BigDecimal> tempValueMap = valueVOS.stream()
//                            .collect(Collectors.toMap(IndicatorsValueVO::getCode, IndicatorsValueVO::getValue));
//                    tempValueMap.put(MONTH, new BigDecimal(reportTime.substring(5)));
//                    tempValueMap.put(KLAST36, last36YearMap.get(lastYear).getValue());
//                    valueList.add(new BigDecimal(operationExpressionUtil.operation(JZCSYL_FORMULA, tempValueMap, 2, BigDecimal.ROUND_HALF_UP)));
//                } else if (TOTAL_LIABILITIES_RATIO.equals(code)) {
//                    valueList.add(valueVOS.stream().collect(Collectors.reducing(BigDecimal.ZERO, IndicatorsValueVO::getValue, BigDecimal::add)));
//                } else {
//                    valueList.add(valueVOS.get(0).getValue());
//                }
//            } else {
//                valueList.add(null);
//            }
//        }
//
//        return IndicatorTrendsVO.builder()
//                .valueList(valueList)
//                .countNameList(indicatorsValueDTO.getCountNameList())
//                .build();
//    }
//
//    @Override
//    @YthTaskObserver
//    public boolean test(Date Date) {
//        return false;
//    }
//
//    /**
//     * 单个指标 查询日期
//     *
//     * @param queryType
//     * @param maxReportTime
//     * @return
//     */
//    private IndicatorsValueDTO getQueryTimeList(int queryType, String maxReportTime) {
//        switch (queryType) {
//            case 1:
//                //年 3年
//                String yearStr = maxReportTime.substring(0, 4);
//                int year = Integer.parseInt(yearStr);
//                return IndicatorsValueDTO.builder()
//                        .yearList(Stream.of((year - 2) + "", (year - 1) + "", maxReportTime.substring(0, 4)).collect(Collectors.toList()))
//                        .monthList(Stream.of("12", "12", maxReportTime.substring(5, 7)).collect(Collectors.toList()))
//                        .countNameList(Stream.of((year - 2) + "", (year - 1) + "", maxReportTime.substring(0, 4)).collect(Collectors.toList()))
//                        .reportTimeList(Stream.of((year - 2) + "-12", (year - 1) + "-12", maxReportTime).collect(Collectors.toList()))
//                        .build();
//            case 2:
//                //季度 返回5个季度
//                String maxQuarterTime = findMaxQuarterTime(maxReportTime);
//                Date maxQuarterDate = DateUtil.parse(maxQuarterTime, DateUtil.PATTERN_MONTH);
//                List<String> quarterList = new ArrayList<>();
//                List<String> yearList = new ArrayList<>();
//                for (int i = 0; i < 5; i++) {
//                    String quarterDate = DateUtil.format(DateUtil.minusMonths(maxQuarterDate, 3 * i), DateUtil.PATTERN_MONTH);
//                    quarterList.add(quarterDate);
//                    String quarterYear = quarterDate.substring(0, 4);
//                    if (!yearList.contains(quarterYear)) {
//                        yearList.add(quarterYear);
//                    }
//                }
//                Collections.reverse(quarterList);
//                return IndicatorsValueDTO.builder()
//                        .yearList(yearList)
//                        .monthList(Stream.of("03", "06", "09", "12").collect(Collectors.toList()))
//                        .countNameList(quarterList)
//                        .reportTimeList(quarterList)
//                        .build();
//            case 3:
//                //月 12月
//                Date maxReportDate = DateUtil.parse(maxReportTime, DateUtil.PATTERN_DATE);
//                List<String> monthList = new ArrayList<>();
//                List<String> yearList3 = new ArrayList<>();
//                for (int i = 0; i < 12; i++) {
//                    String countNameDate = DateUtil.format(DateUtil.minusMonths(maxReportDate, i), DateUtil.PATTERN_MONTH);
//                    monthList.add(countNameDate);
//                    String tempYear = countNameDate.substring(0, 4);
//                    if (!yearList3.contains(tempYear)) {
//                        yearList3.add(tempYear);
//                    }
//                }
//                Collections.reverse(monthList);
//                return IndicatorsValueDTO.builder()
//                        .yearList(yearList3)
//                        .monthList(Stream.of("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12").collect(Collectors.toList()))
//                        .countNameList(monthList)
//                        .reportTimeList(monthList)
//                        .build();
//        }
//        return null;
//    }
//
//    private String findMaxQuarterTime(String maxReportTime) {
//        String monthStr = maxReportTime.substring(5, 7);
//        int month = Integer.parseInt(monthStr);
//        String yearStr = maxReportTime.substring(0, 4);
//        int maxQuarterYear = Integer.parseInt(yearStr);
//        if (month == 12) {
//            return maxReportTime;
//        }
//        if (month >= 9) {
//            return yearStr + "-09";
//        }
//        if (month >= 6) {
//            return yearStr + "-06";
//        }
//        if (month >= 3) {
//            return yearStr + "-03";
//        }
//        return (maxQuarterYear - 1) + "-12";
//    }
//
//    /**
//     * code to value
//     *
//     * @param operationExpressionUtil
//     * @param codeValueMap
//     * @param month
//     * @param code
//     * @return
//     */
//    private BigDecimal codeToValue(OperationExpressionUtil operationExpressionUtil, Map<String, BigDecimal> codeValueMap, int month, String code) {
//        if (JZCSYL.equals(code)) {
//            codeValueMap.put(MONTH, new BigDecimal(month));
//            return new BigDecimal(operationExpressionUtil.operation(JZCSYL_FORMULA, codeValueMap, 2, BigDecimal.ROUND_HALF_UP));
//        } else if (TOTAL_PROFIT_TAX.equals(code)) {
//            return BigDecimalUtil.divide(BigDecimalUtil.add(codeValueMap.get(KSUM40), codeValueMap.get(K58)),
//                    BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP);
//        } else if (TOTAL_LIABILITIES_RATIO.equals(code)) {
//            return BigDecimalUtil.divide(codeValueMap.getOrDefault(K30, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(K22, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100);
//        } else if (RD_INVESTMENT_INTENSITY.equals(code)) {
//            return BigDecimalUtil.divide(codeValueMap.getOrDefault(KSUM62, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KLJ1, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100);
//        } else if (LABOR_GENERATION_RATE.equals(code)) {
//            return BigDecimalUtil.divide(codeValueMap.getOrDefault(KSUM49, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KSUM59, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP);
//        } else if (OPERATING_CASH_RATION.equals(code)) {
//            return BigDecimalUtil.divide(codeValueMap.getOrDefault(K57, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KLJ1, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100);
//        } else {
//            return BigDecimalUtil.divide(codeValueMap.get(code), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP);
//        }
//    }
//
//    /**
//     * detail set value
//     *
//     * @param codeValueMap
//     * @param operationExpressionUtil
//     * @param code
//     * @param detail
//     * @param subtractChildList
//     * @param addChildList
//     * @param sumChildOrgIds
//     * @param last36List
//     * @param reportTimes
//     * @param year
//     */
//    private void setValue(Map<String, BigDecimal> codeValueMap, OperationExpressionUtil operationExpressionUtil,
//                          String code, IndicatorsUnitDetailVO detail, List<String> subtractChildList,
//                          List<String> addChildList, List<String> sumChildOrgIds, List<IndicatorsValueVO> last36List, String[] reportTimes, int year) {
//        if (JZCSYL.equals(code)) {
//            Map<String, BigDecimal> last36ValueMap = ZZDHelper.indicatorsValueToValueMap(year - 1, last36List, subtractChildList, addChildList, sumChildOrgIds);
//            codeValueMap.put(KLAST36, last36ValueMap.get(K36));
//            codeValueMap.put(MONTH, new BigDecimal(reportTimes[1]));
//            detail.setValue(new BigDecimal(operationExpressionUtil.operation(JZCSYL_FORMULA, codeValueMap, 2, BigDecimal.ROUND_HALF_UP)));
//        } else if (TOTAL_PROFIT_TAX.equals(code)) {
//            detail.setValue(BigDecimalUtil.divide(BigDecimalUtil.add(codeValueMap.get(KSUM40), codeValueMap.get(K58)),
//                    BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//        } else if (TOTAL_LIABILITIES_RATIO.equals(code)) {
//            detail.setValue(BigDecimalUtil.divide(codeValueMap.getOrDefault(K30, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(K22, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100));
//        } else if (RD_INVESTMENT_INTENSITY.equals(code)) {
//            detail.setValue(BigDecimalUtil.divide(codeValueMap.getOrDefault(KSUM62, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KLJ1, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100));
//        } else if (LABOR_GENERATION_RATE.equals(code)) {
//            detail.setValue(BigDecimalUtil.divide(codeValueMap.getOrDefault(KSUM49, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KSUM59, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP));
//        } else if (OPERATING_CASH_RATION.equals(code)) {
//            detail.setValue(BigDecimalUtil.divide(codeValueMap.getOrDefault(K57, BigDecimal.ZERO),
//                    codeValueMap.getOrDefault(KLJ1, BigDecimal.ZERO), 2, BigDecimal.ROUND_HALF_UP, 100));
//        } else {
//            detail.setValue(BigDecimalUtil.divide(codeValueMap.get(code), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP));
//        }
//    }
//
//    /**
//     * 融资columnName to value
//     *
//     * @param code
//     * @param storage
//     * @return
//     */
//    private BigDecimal financingCodeToValue(String code, BankOrgStorage storage) {
//        switch (code) {
//            case FINANCING_COST_RATE:
//                return storage.getFinancingCostRate();
//            case INTEREST_BEARING_TOTAL:
//                return storage.getInterestBearingTotal();
//            case DIRECT_FINANCING:
//                return storage.getDirectFinancing();
//            case INDIRECT_FINANCING:
//                return storage.getIndirectFinancing();
//            case LONG_TERM_FINANCING:
//                return storage.getLongTermFinancing();
//            case SHORT_TERM_FINANCING:
//                return storage.getShortTermFinancing();
//        }
//        return null;
//    }
//
//    private List<MaterialProcurement> getMaterialProcurementByYear(String year) {
//        return materialProcurementService.list(Wrappers.<MaterialProcurement>lambdaQuery()
//                .eq(MaterialProcurement::getFillingYear, year).eq(MaterialProcurement::getStatus, FormStatusConstant.FINISH));
//    }
//
//    private List<MaterialProcurementCountDetailVO> valueMapToDetailVO(String typeCode, Map<String, BigDecimal> valueMap, BigDecimal totalValue) {
//        Map<String, String> codeMap = baseInfoService.getChildMap(typeCode);
//        List<MaterialProcurementCountDetailVO> results = new ArrayList<>();
//        for (String code : codeMap.keySet()) {
//            if (code.equals(typeCode)) {
//                continue;
//            }
//            results.add(MaterialProcurementCountDetailVO.builder()
//                    .typeCode(code)
//                    .typeName(codeMap.get(code))
//                    .value(BigDecimalUtil.divide(valueMap.getOrDefault(code, BigDecimal.valueOf(0)), BigDecimal.valueOf(10000), 2, BigDecimal.ROUND_HALF_UP))
//                    .ratio(BigDecimalUtil.divide(valueMap.getOrDefault(code, BigDecimal.valueOf(0)), totalValue, 2, BigDecimal.ROUND_HALF_UP, 100))
//                    .build());
//        }
//        return results;
//    }
//
//    @Override
//    public LargeAmountOverviewVO getLargeAmountOverview(String reportTime) {
//        //资金余额
//        BigDecimal fundBalance = new BigDecimal(0);
//        //带息负债
//        BigDecimal totalInterestLiabilities = new BigDecimal(0);
//        //存贷比
//        BigDecimal depositLoanRation = new BigDecimal(0);
//        //账户总数
//        Integer accountNumber = 0;
//        //集中资金量
//        BigDecimal concentrationFunds = new BigDecimal(0);
//        try {
//            reportTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE);
//            //查询值
//            Map<String, Object> reportBalancesMap = getReportBalancesAndAccoutMap(reportTime);
//
//            if (reportBalancesMap.size() != 0 && reportBalancesMap != null) {
//                /**
//                 * 资金余额
//                 */
//                List<ReportBalance> reportBalances = (List<ReportBalance>) reportBalancesMap.get("reportBalances");
//                if (CollectionUtil.isNotEmpty(reportBalances)) {
//                    double sum = reportBalances.stream().mapToDouble(ReportBalance::getBalanceCny).sum();
//                    fundBalance = BigDecimal.valueOf(sum);
//                }
//                /**
//                 * 账户总数
//                 */
//                List<ReportAccInfo> reportAccInfoList = (List<ReportAccInfo>) reportBalancesMap.get("reportAccInfoList");
//                if (CollectionUtil.isNotEmpty(reportAccInfoList)) {
//                    accountNumber = reportAccInfoList.size();
//                }
//
//                /**
//                 * 集中资金量
//                 */
//                List<ReportAccInfo> conformReportAccInfoList = reportAccInfoList.stream().filter(item -> !Objects.isNull(item.getZjFocusManage()) && item.getZjFocusManage() == 1
//                        && !Objects.isNull(item.getAccState()) && item.getAccState() == 0).collect(Collectors.toList());
//                if (CollectionUtil.isNotEmpty(conformReportAccInfoList)) {
//                    List<String> groupCodes = conformReportAccInfoList.stream().map(ReportAccInfo::getGroupCode).collect(Collectors.toList());
//
//                    List<ReportBalance> concentrateBalanceList = reportBalances.stream().filter(e -> groupCodes.contains(e.getReportCorpCode())).collect(Collectors.toList());
//                    if (CollectionUtil.isNotEmpty(concentrateBalanceList)) {
//                        double oncentrateBalance = concentrateBalanceList.stream().mapToDouble(ReportBalance::getBalanceCny).sum();
//                        concentrationFunds = BigDecimal.valueOf(oncentrateBalance);
//                    }
//                }
//
//                /**
//                 * 存贷比
//                 */
//                FacadeQueryVO param = new FacadeQueryVO();
//                param.setQueryDate(reportTime);
//                param.setFinanceType(FinancingVarietiesConstant.type);
//                //查询借款  金蝶
//                KingdeeReturnVO<FacadeSummaryVO> result = null;
//                try {
//                    result = KingdeeClient.balanceStatistics(param);
//                } catch (Exception e) {
//                    throw new RuntimeException("error借款查询(金蝶)失败！" + e);
//                }
//                if (result.getSuccess()) {
//                    List<FacadeSummaryVO> datas = result.getList();
//                    if (CollectionUtil.isNotEmpty(datas)) {
//                        FacadeSummaryVO fCompany = datas.get(0);
//                        //借款
//                        BigDecimal closingFinancingBalance = fCompany.getClosingFinancingBalance();
//                        //去去余额表查询存款 国资层级 000101
//                        depositLoanRation = fundBalance.divide(closingFinancingBalance, BigDecimal.ROUND_HALF_UP);
//
//                    }
//
//                }
//                /**
//                 *  带息负债 （暂无）
//                 */
//            }
//        } catch (Exception e) {
//            StackTraceElement ste = e.getStackTrace()[0];
//            String errorMsg = "error:ClassName：" + ste.getClassName() + ",Method：" + ste.getMethodName() +
//                    "Location：" + ste.getLineNumber() + ",Message:" + e.getMessage();
//            log.error("error-getLargeAmountOverview" + errorMsg);
//            throw new RuntimeException("error-getLargeAmountOverview-大额资金总览" + errorMsg);
//        }
//        return LargeAmountOverviewVO.builder()
//                .fundBalance(fundBalance)
//                .totalInterestLiabilities(totalInterestLiabilities)
//                .depositLoanRation(depositLoanRation)
//                .accountNumber(accountNumber)
//                .concentrationFunds(concentrationFunds).build();
//    }
//
//    /**
//     * 十三家对应的orgcode
//     * 余额信息
//     * 账户信息
//     *
//     * @param reportTime
//     * @return
//     */
//    private Map<String, Object> getReportBalancesAndAccoutMap(String reportTime) {
//
//        Map<String, Object> result = MapUtil.createMap(LinkedHashMap.class);
//        List<Org> summaryOrgList = orgService.getGzwUnits(orgService.getDTFlag(DateUtil.format(DateUtil.parse(reportTime, DateUtil.PATTERN_DATE), DateUtil.PATTERN_MONTH)));
//        List<String> sumChildOrgIds = summaryOrgList.stream().map(Org::getId).collect(Collectors.toList());
//        //去查询对应的orgCode
//        List<PropertyBasics> propertyBasics = propertyBasicsMapper.selectList(new LambdaQueryWrapper<PropertyBasics>().in(PropertyBasics::getOrgId, sumChildOrgIds));
//        List<String> orgCodes = propertyBasics.stream().map(PropertyBasics::getOrgCode).collect(Collectors.toList());
//
//        //去余额表找对应的集团code
//        List<ReportBalance> reportBalances = reportBalanceMapper.selectList(new LambdaQueryWrapper<ReportBalance>().in(ReportBalance::getReportCorpCode, orgCodes)
//                .eq(ReportBalance::getBalDate, reportTime));
//
//        List<ReportAccInfo> reportAccInfoList = new ArrayList<>();
//        if (CollectionUtil.isNotEmpty(reportBalances)) {
//            //账户表找到账户信息
//            Map<String, List<ReportBalance>> currentMap = reportBalances.stream().collect(Collectors.groupingBy(ReportBalance::getReportCorpCode));
//            if (currentMap.size() != 0 && currentMap != null) {
//                Set<String> groupSet = currentMap.keySet();
//                reportAccInfoList = reportAccInfoMapper.selectList(new LambdaQueryWrapper<ReportAccInfo>().in(ReportAccInfo::getGroupCode, groupSet));
//            }
//        }
//        result.put("orgCodes", orgCodes);
//        result.put("reportBalances", reportBalances);
//        result.put("reportAccInfoList", reportAccInfoList);
//        return result;
//    }
//
//
//    @Override
//    public List<LargeAmountUnitDetailVO> largeAmountUnitDetail(String reportTime) {
//
//        List<LargeAmountUnitDetailVO> result = new ArrayList<>();
//        try {
//            reportTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE);
//
//            //所有的集中资金账户
//            Map<String, Object> reportBalancesMap = getReportBalancesAndAccoutMap(reportTime);
//
//            List<ReportBalance> reportBalances = (List<ReportBalance>) reportBalancesMap.get("reportBalances");
//            if (CollectionUtil.isNotEmpty(reportBalances)) {
//                //符合的集团
//                List<ReportAccInfo> reportAccInfoList = (List<ReportAccInfo>) reportBalancesMap.get("reportAccInfoList");
//                if (CollectionUtil.isNotEmpty(reportAccInfoList)) {
//                    //符合的集中资金账户
//                    List<ReportAccInfo> conformReportAccInfoList = reportAccInfoList.stream().filter(e -> !Objects.isNull(e.getAccState()) && e.getAccState() == 0
//                            && !Objects.isNull(e.getZjFocusManage()) && e.getZjFocusManage() == 1).collect(Collectors.toList());
//
//                    if (CollectionUtil.isNotEmpty(conformReportAccInfoList)) {
//                        List<String> groupCodes = conformReportAccInfoList.stream().map(ReportAccInfo::getGroupCode).collect(Collectors.toList());
//
//                        //查询余额信息表
//                        String orgCodes = reportBalancesMap.get("orgCodes").toString();
//                        List<ReportBalance> reportBalanceList = reportBalanceMapper.selectList(new LambdaQueryWrapper<ReportBalance>().in(ReportBalance::getReportCorpCode, orgCodes)
//                                .eq(ReportBalance::getBalDate, reportTime));
//
//                        if (CollectionUtil.isNotEmpty(reportBalanceList)) {
//                            List<ReportBalance> concentrateBalanceList = reportBalanceList.stream().filter(e -> groupCodes.contains(e.getReportCorpCode())).collect(Collectors.toList());
//                            if (CollectionUtil.isNotEmpty(concentrateBalanceList)) {
//                                //总共集中资金
//                                double oncentrateBalance = concentrateBalanceList.stream().mapToDouble(ReportBalance::getBalanceCny).sum();
//                                BigDecimal concentrationFunds = BigDecimal.valueOf(oncentrateBalance);
//
//                                Map<String, List<ReportBalance>> reportBalanceMap = concentrateBalanceList.stream().collect(Collectors.groupingBy(e -> e.getReportCorpCode()));
//                                BigDecimal groupValue = new BigDecimal(0);
//                                int sort = 0;
//                                for (ReportAccInfo reportAccInfo : conformReportAccInfoList) {
//                                    LargeAmountUnitDetailVO largeAmountUnitDetailVO = new LargeAmountUnitDetailVO();
//                                    largeAmountUnitDetailVO.setUnitId(reportAccInfo.getGroupCode());
//                                    largeAmountUnitDetailVO.setUnitName(reportAccInfo.getGroupName());
//                                    List<ReportBalance> currReportBalanceList = reportBalanceMap.get(reportAccInfo.getGroupCode());
//                                    if (CollectionUtil.isNotEmpty(currReportBalanceList)) {
//                                        double currSum = currReportBalanceList.stream().mapToDouble(ReportBalance::getBalanceCny).sum();
//                                        BigDecimal currTotal = BigDecimal.valueOf(currSum);
//                                        groupValue = currTotal.divide(concentrationFunds, BigDecimal.ROUND_HALF_UP);
//                                    }
//                                    largeAmountUnitDetailVO.setValue(groupValue);
//                                    largeAmountUnitDetailVO.setOrderNum(++sort);
//                                    result.add(largeAmountUnitDetailVO);
//                                }
//                            }
//                        }
//
//                    }
//                }
//            }
//
//        } catch (Exception e) {
//            StackTraceElement ste = e.getStackTrace()[0];
//            String errorMsg = "error:ClassName：" + ste.getClassName() + ",Method：" + ste.getMethodName() + "Location：" +
//                    ste.getLineNumber() + ",Message:" + e.getMessage();
//            log.error("error-largeAmountUnitDetail" + errorMsg);
//            throw new RuntimeException("error-largeAmountUnitDetail-大额资金各集团占比" + errorMsg);
//        }
//        return result;
//    }
//}
